import 'package:flutter/material.dart';

class HYAboutPage extends StatelessWidget {
  static const String routeName = '/about';

  @override
  Widget build(BuildContext context) {
    final String message = ModalRoute.of(context).settings.arguments as String;

    return Scaffold(
      appBar: AppBar(
        title: Text('关于'),
        leading: IconButton(
            icon: Icon(Icons.arrow_back),
            onPressed: () => _backToHome(context)),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text(message),
            RaisedButton(
                child: Text('返回首页', style: TextStyle(fontSize: 20)),
                onPressed: () => _backToHome(context))
          ],
        ),
      ),
    );
  }

  _backToHome(BuildContext context) {
    Navigator.of(context).pop('a about message');
  }
}
